Integrand size = 22, antiderivative size = 79 \[ \int (e x)^{-1+n} \left (a+b \text {sech}\left (c+d x^n\right )\right )^2 \, dx=\frac {a^2 (e x)^n}{e n}+\frac {2 a b x^{-n} (e x)^n \arctan \left (\sinh \left (c+d x^n\right )\right )}{d e n}+\frac {b^2 x^{-n} (e x)^n \tanh \left (c+d x^n\right )}{d e n} \]
a^2*(e*x)^n/e/n+2*a*b*(e*x)^n*arctan(sinh(c+d*x^n))/d/e/n/(x^n)+b^2*(e*x)^ n*tanh(c+d*x^n)/d/e/n/(x^n)
Time = 0.99 (sec) , antiderivative size = 57, normalized size of antiderivative = 0.72 \[ \int (e x)^{-1+n} \left (a+b \text {sech}\left (c+d x^n\right )\right )^2 \, dx=\frac {x^{-n} (e x)^n \left (a \left (a \left (c+d x^n\right )+2 b \arctan \left (\sinh \left (c+d x^n\right )\right )\right )+b^2 \tanh \left (c+d x^n\right )\right )}{d e n} \]
((e*x)^n*(a*(a*(c + d*x^n) + 2*b*ArcTan[Sinh[c + d*x^n]]) + b^2*Tanh[c + d *x^n]))/(d*e*n*x^n)
Time = 0.48 (sec) , antiderivative size = 56, normalized size of antiderivative = 0.71, number of steps used = 9, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.364, Rules used = {5963, 5959, 3042, 4260, 3042, 4254, 24, 4257}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int (e x)^{n-1} \left (a+b \text {sech}\left (c+d x^n\right )\right )^2 \, dx\) |
\(\Big \downarrow \) 5963 |
\(\displaystyle \frac {x^{-n} (e x)^n \int x^{n-1} \left (a+b \text {sech}\left (d x^n+c\right )\right )^2dx}{e}\) |
\(\Big \downarrow \) 5959 |
\(\displaystyle \frac {x^{-n} (e x)^n \int \left (a+b \text {sech}\left (d x^n+c\right )\right )^2dx^n}{e n}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {x^{-n} (e x)^n \int \left (a+b \csc \left (i d x^n+i c+\frac {\pi }{2}\right )\right )^2dx^n}{e n}\) |
\(\Big \downarrow \) 4260 |
\(\displaystyle \frac {x^{-n} (e x)^n \left (2 a b \int \text {sech}\left (d x^n+c\right )dx^n+b^2 \int \text {sech}^2\left (d x^n+c\right )dx^n+a^2 x^n\right )}{e n}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {x^{-n} (e x)^n \left (2 a b \int \csc \left (i d x^n+i c+\frac {\pi }{2}\right )dx^n+b^2 \int \csc \left (i d x^n+i c+\frac {\pi }{2}\right )^2dx^n+a^2 x^n\right )}{e n}\) |
\(\Big \downarrow \) 4254 |
\(\displaystyle \frac {x^{-n} (e x)^n \left (2 a b \int \csc \left (i d x^n+i c+\frac {\pi }{2}\right )dx^n+\frac {i b^2 \int 1d\left (-i \tanh \left (d x^n+c\right )\right )}{d}+a^2 x^n\right )}{e n}\) |
\(\Big \downarrow \) 24 |
\(\displaystyle \frac {x^{-n} (e x)^n \left (2 a b \int \csc \left (i d x^n+i c+\frac {\pi }{2}\right )dx^n+a^2 x^n+\frac {b^2 \tanh \left (c+d x^n\right )}{d}\right )}{e n}\) |
\(\Big \downarrow \) 4257 |
\(\displaystyle \frac {x^{-n} (e x)^n \left (a^2 x^n+\frac {2 a b \arctan \left (\sinh \left (c+d x^n\right )\right )}{d}+\frac {b^2 \tanh \left (c+d x^n\right )}{d}\right )}{e n}\) |
3.1.76.3.1 Defintions of rubi rules used
Int[csc[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> Simp[-d^(-1) Subst[Int[Exp andIntegrand[(1 + x^2)^(n/2 - 1), x], x], x, Cot[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[n/2, 0]
Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]
Int[(csc[(c_.) + (d_.)*(x_)]*(b_.) + (a_))^2, x_Symbol] :> Simp[a^2*x, x] + (Simp[2*a*b Int[Csc[c + d*x], x], x] + Simp[b^2 Int[Csc[c + d*x]^2, x] , x]) /; FreeQ[{a, b, c, d}, x]
Int[(x_)^(m_.)*((a_.) + (b_.)*Sech[(c_.) + (d_.)*(x_)^(n_)])^(p_.), x_Symbo l] :> Simp[1/n Subst[Int[x^(Simplify[(m + 1)/n] - 1)*(a + b*Sech[c + d*x] )^p, x], x, x^n], x] /; FreeQ[{a, b, c, d, m, n, p}, x] && IGtQ[Simplify[(m + 1)/n], 0] && IntegerQ[p]
Int[((e_)*(x_))^(m_.)*((a_.) + (b_.)*Sech[(c_.) + (d_.)*(x_)^(n_)])^(p_.), x_Symbol] :> Simp[e^IntPart[m]*((e*x)^FracPart[m]/x^FracPart[m]) Int[x^m* (a + b*Sech[c + d*x^n])^p, x], x] /; FreeQ[{a, b, c, d, e, m, n, p}, x]
Result contains higher order function than in optimal. Order 9 vs. order 3.
Time = 17.01 (sec) , antiderivative size = 271, normalized size of antiderivative = 3.43
method | result | size |
risch | \(\frac {a^{2} x \,{\mathrm e}^{\frac {\left (-1+n \right ) \left (-i \operatorname {csgn}\left (i e \right ) \operatorname {csgn}\left (i x \right ) \operatorname {csgn}\left (i e x \right ) \pi +i \operatorname {csgn}\left (i e \right ) \operatorname {csgn}\left (i e x \right )^{2} \pi +i \operatorname {csgn}\left (i x \right ) \operatorname {csgn}\left (i e x \right )^{2} \pi -i \operatorname {csgn}\left (i e x \right )^{3} \pi +2 \ln \left (e \right )+2 \ln \left (x \right )\right )}{2}}}{n}-\frac {2 x \,x^{-n} b^{2} {\mathrm e}^{\frac {\left (-1+n \right ) \left (-i \operatorname {csgn}\left (i e \right ) \operatorname {csgn}\left (i x \right ) \operatorname {csgn}\left (i e x \right ) \pi +i \operatorname {csgn}\left (i e \right ) \operatorname {csgn}\left (i e x \right )^{2} \pi +i \operatorname {csgn}\left (i x \right ) \operatorname {csgn}\left (i e x \right )^{2} \pi -i \operatorname {csgn}\left (i e x \right )^{3} \pi +2 \ln \left (e \right )+2 \ln \left (x \right )\right )}{2}}}{d n \left (1+{\mathrm e}^{2 c +2 d \,x^{n}}\right )}+\frac {4 \arctan \left ({\mathrm e}^{c +d \,x^{n}}\right ) e^{n} a b \,{\mathrm e}^{\frac {i \pi \,\operatorname {csgn}\left (i e x \right ) \left (-1+n \right ) \left (\operatorname {csgn}\left (i e x \right )-\operatorname {csgn}\left (i x \right )\right ) \left (-\operatorname {csgn}\left (i e x \right )+\operatorname {csgn}\left (i e \right )\right )}{2}}}{d e n}\) | \(271\) |
a^2/n*x*exp(1/2*(-1+n)*(-I*csgn(I*e)*csgn(I*x)*csgn(I*e*x)*Pi+I*csgn(I*e)* csgn(I*e*x)^2*Pi+I*csgn(I*x)*csgn(I*e*x)^2*Pi-I*csgn(I*e*x)^3*Pi+2*ln(e)+2 *ln(x)))-2/d/n*x/(x^n)*b^2*exp(1/2*(-1+n)*(-I*csgn(I*e)*csgn(I*x)*csgn(I*e *x)*Pi+I*csgn(I*e)*csgn(I*e*x)^2*Pi+I*csgn(I*x)*csgn(I*e*x)^2*Pi-I*csgn(I* e*x)^3*Pi+2*ln(e)+2*ln(x)))/(1+exp(2*c+2*d*x^n))+4*arctan(exp(c+d*x^n))/d/ e*e^n/n*a*b*exp(1/2*I*Pi*csgn(I*e*x)*(-1+n)*(csgn(I*e*x)-csgn(I*x))*(-csgn (I*e*x)+csgn(I*e)))
Leaf count of result is larger than twice the leaf count of optimal. 646 vs. \(2 (79) = 158\).
Time = 0.27 (sec) , antiderivative size = 646, normalized size of antiderivative = 8.18 \[ \int (e x)^{-1+n} \left (a+b \text {sech}\left (c+d x^n\right )\right )^2 \, dx=\text {Too large to display} \]
(a^2*d*cosh((n - 1)*log(e))*cosh(n*log(x)) + (a^2*d*cosh((n - 1)*log(e))*c osh(n*log(x)) + a^2*d*cosh(n*log(x))*sinh((n - 1)*log(e)) + (a^2*d*cosh((n - 1)*log(e)) + a^2*d*sinh((n - 1)*log(e)))*sinh(n*log(x)))*cosh(d*cosh(n* log(x)) + d*sinh(n*log(x)) + c)^2 - 2*b^2*cosh((n - 1)*log(e)) + 2*(a^2*d* cosh((n - 1)*log(e))*cosh(n*log(x)) + a^2*d*cosh(n*log(x))*sinh((n - 1)*lo g(e)) + (a^2*d*cosh((n - 1)*log(e)) + a^2*d*sinh((n - 1)*log(e)))*sinh(n*l og(x)))*cosh(d*cosh(n*log(x)) + d*sinh(n*log(x)) + c)*sinh(d*cosh(n*log(x) ) + d*sinh(n*log(x)) + c) + (a^2*d*cosh((n - 1)*log(e))*cosh(n*log(x)) + a ^2*d*cosh(n*log(x))*sinh((n - 1)*log(e)) + (a^2*d*cosh((n - 1)*log(e)) + a ^2*d*sinh((n - 1)*log(e)))*sinh(n*log(x)))*sinh(d*cosh(n*log(x)) + d*sinh( n*log(x)) + c)^2 + 4*((a*b*cosh((n - 1)*log(e)) + a*b*sinh((n - 1)*log(e)) )*cosh(d*cosh(n*log(x)) + d*sinh(n*log(x)) + c)^2 + a*b*cosh((n - 1)*log(e )) + 2*(a*b*cosh((n - 1)*log(e)) + a*b*sinh((n - 1)*log(e)))*cosh(d*cosh(n *log(x)) + d*sinh(n*log(x)) + c)*sinh(d*cosh(n*log(x)) + d*sinh(n*log(x)) + c) + (a*b*cosh((n - 1)*log(e)) + a*b*sinh((n - 1)*log(e)))*sinh(d*cosh(n *log(x)) + d*sinh(n*log(x)) + c)^2 + a*b*sinh((n - 1)*log(e)))*arctan(cosh (d*cosh(n*log(x)) + d*sinh(n*log(x)) + c) + sinh(d*cosh(n*log(x)) + d*sinh (n*log(x)) + c)) + (a^2*d*cosh(n*log(x)) - 2*b^2)*sinh((n - 1)*log(e)) + ( a^2*d*cosh((n - 1)*log(e)) + a^2*d*sinh((n - 1)*log(e)))*sinh(n*log(x)))/( d*n*cosh(d*cosh(n*log(x)) + d*sinh(n*log(x)) + c)^2 + 2*d*n*cosh(d*cosh...
\[ \int (e x)^{-1+n} \left (a+b \text {sech}\left (c+d x^n\right )\right )^2 \, dx=\int \left (e x\right )^{n - 1} \left (a + b \operatorname {sech}{\left (c + d x^{n} \right )}\right )^{2}\, dx \]
\[ \int (e x)^{-1+n} \left (a+b \text {sech}\left (c+d x^n\right )\right )^2 \, dx=\int { {\left (b \operatorname {sech}\left (d x^{n} + c\right ) + a\right )}^{2} \left (e x\right )^{n - 1} \,d x } \]
4*a*b*e^n*integrate(e^(d*x^n + n*log(x) + c)/(e*x*e^(2*d*x^n + 2*c) + e*x) , x) - 2*b^2*e^n/(d*e*n*e^(2*d*x^n + 2*c) + d*e*n) + (e*x)^n*a^2/(e*n)
\[ \int (e x)^{-1+n} \left (a+b \text {sech}\left (c+d x^n\right )\right )^2 \, dx=\int { {\left (b \operatorname {sech}\left (d x^{n} + c\right ) + a\right )}^{2} \left (e x\right )^{n - 1} \,d x } \]
Time = 2.16 (sec) , antiderivative size = 158, normalized size of antiderivative = 2.00 \[ \int (e x)^{-1+n} \left (a+b \text {sech}\left (c+d x^n\right )\right )^2 \, dx=\frac {4\,\mathrm {atan}\left (\frac {a\,b\,x\,{\mathrm {e}}^{d\,x^n}\,{\mathrm {e}}^c\,{\left (e\,x\right )}^{n-1}\,\sqrt {d^2\,n^2\,x^{2\,n}}}{d\,n\,x^n\,\sqrt {a^2\,b^2\,x^2\,{\left (e\,x\right )}^{2\,n-2}}}\right )\,\sqrt {a^2\,b^2\,x^2\,{\left (e\,x\right )}^{2\,n-2}}}{\sqrt {d^2\,n^2\,x^{2\,n}}}+\frac {a^2\,x\,{\left (e\,x\right )}^{n-1}}{n}-\frac {2\,b^2\,x\,{\left (e\,x\right )}^{n-1}}{d\,n\,x^n\,\left ({\mathrm {e}}^{2\,c+2\,d\,x^n}+1\right )} \]